$(document).ready(function(){
    $("#btnLogin").click(function(){
        $("#loginForm").ajaxSubmit({
            dataType:"json",
            success:function(data){
                if(data.status==1){
                    alert(data.msg);
                    location.href="/user";
                }else{
                    alert(data.msg);
                }
            }
        });
    });
});